import request from '@/utils/request'

// 查询ad列表
export function listDialogue(query) {
  return request({
    url: '/customer/dialogue/list',
    method: 'get',
    params: query
  })
}

// 查询ad详细
export function getDialogue(adId) {
  return request({
    url: '/customer/dialogue/' + adId,
    method: 'get'
  })
}

// 新增ad
export function addDialogue(data) {
  return request({
    url: '/customer/dialogue',
    method: 'post',
    data: data
  })
}

// 修改ad
export function updateDialogue(data) {
  return request({
    url: '/customer/dialogue',
    method: 'put',
    data: data
  })
}

// 删除ad
export function delDialogue(adId) {
  return request({
    url: '/customer/dialogue/' + adId,
    method: 'delete'
  })
}

// 导出ad
export function exportDialogue(query) {
  return request({
    url: '/customer/dialogue/export',
    method: 'get',
    params: query
  })
}